package coba.util;

import java.util.LinkedList;
import java.util.List;

import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;

import coba.model.ItinerarioRecorrido;
import coba.service.ItinerarioRecorridoLocalServiceUtil;

public class GetListItinerarioIdFromRecorridoId {

	public static List<Long> get(Long recorridoId) throws PortalException, SystemException {

		List<Long> listItinerarioId = new LinkedList<Long>();

		//Recorrido recorrido = RecorridoLocalServiceUtil.getRecorrido(recorridoId);

		List<ItinerarioRecorrido> listItinerarioRecorrido =
				ItinerarioRecorridoLocalServiceUtil.findByRecorridoId(recorridoId);

		for (ItinerarioRecorrido it : listItinerarioRecorrido) {
			listItinerarioId.add(it.getItinerarioId());
		}

		return listItinerarioId;

	}

}
